package internet_project.Manage;

import internet_project.Server.Connect_Client_Socket_Thread;

import java.util.HashMap;

/**
 * 一个工具类 管理 与 多个客户端 连接 (socket)管道  的集合
 */
public class manage_InputSocket_Thread_Utility {
  public static HashMap<String, Connect_Client_Socket_Thread> HM = new HashMap<>();

  public static Connect_Client_Socket_Thread getClient_socket(String userid) {
    return HM.get(userid);
  }

  public static void add_Connect_Client_Socket_Thread(String userid, Connect_Client_Socket_Thread connect_client_socket_thread) {
    HM.put(userid, connect_client_socket_thread);
  }

  public static HashMap<String, Connect_Client_Socket_Thread> getHM() {
    return HM;
  }

  public static Connect_Client_Socket_Thread remove(String userid) {
    return HM.remove(userid);
  }

}
